class DeviceAndlink:
    UrlDeviceInfo = "/debug/query/deviceinfo"
    UrlControl = "/device/command/control"
    UrlUnbind = "/device/command/unbind"
    UrlKickout = "/device/command/kickout"
    UrlFile = "/device/command/file"
    UrlNetinfo = "/qlink/netinfo"
    UrlLog = "/device/command/log"
    UrlQuery = "/device/command/query"
    UrlSelfdetect = "/device/command/selfdetect"
    UrlInnerCommand = "/debug/query/innercommand"

    #芯片信息，可包含多组
    class ChipInfo:
        def __init__(self):
            self.type = ""
            self.factory = ""
            self.model = ""

    #设备扩展信息结构体
    class DeviceExtInfo:
        def __init__(self):
            self.cmei = ""
            self.authMode = 0
            self.authId = ""
            self.sn = ""
            self.reserve = ""
            self.manuDate = ""
            self.OS = ""
            self.chips = []
            self.cpuModel = ""
            self.romStorageSize = ""
            self.ramStorageSize = ""
            self.networkType = ""
            self.locationInfo = ""
            self.deviceVendor = ""
            self.deviceBrand = ""
            self.deviceModel = ""
            self.wlanMac = ""
            self.bluetoothMacAddress = ""
            self.powerSupplyMode = ""
            self.wifiRssi = ""
            self.deviceIP = ""
            self.deviceManageExtInfo = {}

    #Andlink设备信息结构体
    class DeviceFullStatus:
        def __init__(self):
            self.deviceId = ""
            self.deviceMac = ""
            self.deviceType = ""
            self.deviceToken = ""
            self.productToken = ""
            self.andlinkToken = ""
            self.firmwareVersion = ""
            self.softwareVersion = ""
            self.ipAddress = ""
            self.protocolVersion = ""
            self.deviceExtInfo = DeviceAndlink.DeviceExtInfo()

            #------------------Inner Use, DO NOT MODIFY----------------/
            self.homeGwHeartBeatTime = 0
            self.homeGwEncrypt = 0

            #others
            self.curOnlineStatus = 0
            self.bindStatus = 0

            #report flag
            self.bootstrapStatus = 0
            self.bootStatus = 0
            self.offlineStatus = 0

            #retry flag
            self.bootstrapLastFailTime = 0
            self.bootstrapFailWaitTime = 0
            self.bootLastFailTime = 0
            self.bootFailWaitTime = 0
            self.bootLastSuccessTime = 0
            self.lastDmReportTime = 0
            self.lastCheckUpgradeTime = 0
            self.innerInfo = ""

    class SelfdetectInfo:
        def __init__(self):
            self.cpuRate = -1
            self.ramRate = -1
            self.upLinkType = ""
            self.andlinkStatus = False
            self.lastUpTime = 0
            self.lastConnTime = 0

